package org.example.B1;

/**恒温烧水器的状态**/
public enum State {
    /**待机状态**/
    STANDBY("STANDBY","待机状态"),
    /**休眠状态**/
    SLEEP("SLEEP","休眠状态"),

    /**维修状态**/
    REPAIR("REPAIR","维修状态"),
    /**加热状态**/
    HEAT("HEAT","加热状态");

    private final String name;  // 状态的名称
    private final String value; // 状态的描述

    State(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return this.name;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return "State{" +
                "name='" + name + '\'' +
                ", value='" + value + '\'' +
                '}';
    }
}
